local kunfen = fk.CreateSkill {
  name = "mini__kunfen",
}

Fk:loadTranslationTable{
  ["mini__kunfen"] = "困奋",
  [":mini__kunfen"] = "结束阶段，你可以失去1点体力，然后摸两张牌。",

  ["$mini__kunfen1"] = "以为这样便能拦住我吗！",
  ["$mini__kunfen2"] = "柳暗花明又一村。",
}

kunfen:addEffect(fk.EventPhaseStart, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(kunfen.name) and player.phase == Player.Finish
  end,
  on_use = function(self, event, target, player, data)
    ---@type string
    local skillName = kunfen.name
    player.room:loseHp(player, 1, skillName)
    if player:isAlive() then
      player:drawCards(2, skillName)
    end
  end,
})

return kunfen
